<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>添加地址</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>
    <style>
        .aui-radio {
            margin-top: 13px;
        }
    </style>
</head>
<body>

<div class="aui-content">
    <ul class="aui-list-view   ">
        <li class="aui-list-view-cell aui-flex-col aui-padded-0-10 aui-padded-t-5 aui-padded-b-5">
            <div class="aui-flex-item-3 aui-flex-row aui-flex-middle">联系人</div>
            <div class="aui-flex-item-9"><input class="aui-margin-0 noBorder name" type="text" placeholder="单击输入姓名"></div>
        </li>
        <li class="aui-list-view-cell aui-flex-col aui-padded-0-10 aui-padded-t-5 aui-padded-b-5">
            <div class="aui-flex-item-3 aui-flex-row aui-flex-middle">联系方式</div>
            <div class="aui-flex-item-9"><input value="" class="aui-margin-0 noBorder phone" type="number"
                                                placeholder="单击输入联系方式"></div>
        </li>
        <!--<li class="aui-list-view-cell aui-flex-col aui-padded-0-10">-->
            <!--<div class="aui-flex-item-3 aui-flex-row aui-flex-middle">收货地址</div>-->
            <!--<div class="aui-flex-item-9"><input class="aui-margin-0 noBorder addres" type="text" placeholder="点击添加收货地址"></div>-->
        </li>
        <li class="aui-list-view-cell aui-flex-col aui-padded-0-10 aui-padded-t-5 aui-padded-b-5">
            <div class="aui-flex-item-3 aui-flex-row aui-flex-middle">地址详情</div>
            <div class="aui-flex-item-9"><input class="aui-margin-0 noBorder addresInfo" type="text"
                                                placeholder="请补充地址信息，如3号楼4单元106"></div>
        </li>

    </ul>
</div>


</body>
<script src="../script/api.js"></script>
<script src="../script/common.js"></script>
<script src="../script/mui.min.js"></script>
<script src="../script/jquery.min.js"></script>
<script>
    var type=""
    apiready = function () {
        getUserInfo();
        api.parseTapmode();
        type=api.pageParam.type;
    }
    function addAddress() {
        var name=$(".name").val();
        var phone=$(".phone").val();
//        var address=$(".addres").val();
        var addressInfo=$(".addresInfo").val();

        showLoading()
        var url = "user/update_address";
        var data = {};
        data["consignee"] = name;
        data["mobile"] = phone;
        data["address"] = addressInfo;

        getStorageAll();
        ajaxRequest(url, 'post', data, function (ret, err) {

                api.sendEvent({
                    name:"updateAddress",
                    extra:{
                        key:true
                    }
                })
                api.toast({
                    msg:"添加成功！",
                    location:"middle"
                })
            setTimeout(function () {
                closeWin();
            },1500)

        });
    }
</script>
</html>